'''
1.0版本
import random

number = random.randint(1, 100)
speculate_number = int(input("请输入您猜测的数字："))
boole = True
while boole:
    if speculate_number < number:
        print("猜小了")
        speculate_number = int(input("请输入您猜测的数字："))
    elif speculate_number > number:
        print("猜大了")
        speculate_number = int(input("请输入您猜测的数字："))
    else:
        print(f"恭喜您猜对了，本轮幸运数字:{number}")
        boole = False
'''

'''
2.0版本
import random

original_money = 5000
number = random.randint(1, 100)
i = 0
print(number)
while original_money > 0:
    if i == 0:
        speculate_number = int(input("请输入您猜测的数字："))
    if speculate_number < number:
        original_money -= 500
        print(f"猜小了，剩余金币：{original_money}")
        speculate_number = int(input("请输入您猜测的数字："))
        i += 1
    elif speculate_number > number:
        original_money -= 500
        print(f"猜大了，剩余金币：{original_money}")
        speculate_number = int(input("请输入您猜测的数字："))
        i += 1
    else:
        original_money += 3000
        print(f"恭喜您猜对了，本轮幸运数字:{number}")
        print(f"当前金币余额为：{original_money}，开始新一轮游戏")
        number = random.randint(1, 100)
        i = 0
print(f"金币余额不足，游戏退出")
'''

'''
3.0版本
import random

original_money = 5000
number = random.randint(1, 100)
i = 0
print(number)
while original_money > 0:
    if i == 0:
        speculate_number = int(input("请输入您猜测的数字："))
    if speculate_number < number:
        original_money -= 500
        print(f"猜小了，剩余金币：{original_money}")
        speculate_number = int(input("请输入您猜测的数字："))
        i += 1
    elif speculate_number > number:
        original_money -= 500
        print(f"猜大了，剩余金币：{original_money}")
        speculate_number = int(input("请输入您猜测的数字："))
        i += 1
    else:
        original_money += 3000
        print(f"恭喜您猜对了，本轮幸运数字:{number}")
        print(f"当前金币余额为：{original_money}")
        number = random.randint(1, 100)
        i = 0
        print("是否要继续游戏？继续请输入1，退出请输入其他任意数字")
        a = int(input("请输入："))
        if a == 1:
            continue
        elif a != 1:
            break
if original_money < 0:
    print("金币余额不足，游戏退出")
else:
    print(f"用户结束游戏，当前余额为：{original_money},系统退出,欢迎下次游玩！")
'''